/* eslint-disable func-style */
/* eslint-disable require-jsdoc */
function addMsg (Blockly) {
    Object.assign(Blockly.ScratchMsgs.locales.en, {
        U8G2_CATEGORY: 'U8G2',
        U8G2_12864LCD_INIT: 'init u8g2 128x64 lcd pin RS (CS) %1 R/W (DATA) %2 E (CLK) %3',
        U8G2_12864LCD_INIT_TOOLTIP: 'Only support for ST7920 lcd controller',
        U8G2_12864OLED_INIT: 'init u8g2 128x64 oled pin SCL %1 SDA %2',
        U8G2_OLED_INIT_TOOLTIP: 'Only support for SSD1306 oled controller',
        U8G2_12832OLED_INIT: 'init u8g2 128x32 oled pin SCL %1 SDA %2',
        U8G2_SETDRAWCOLOR: 'u8g2 set draw color %1',
        U8G2_COLOR_COLORED: 'colored',
        U8G2_COLOR_NOCOLORED: 'no-colored',
        U8G2_DRAWPIXEL: 'u8g2 draw pixel x: %1 y: %2',
        U8G2_DRAWVHLINE: 'u8g2 draw %1 line x: %2 y: %3 length %4',
        U8G2_STYLE_VERTICAL: 'vertical',
        U8G2_STYLE_HORIZONTAL: 'horizontal',
        U8G2_DRAWLINE: 'u8g2 draw line x0: %1 y0: %2, x1: %3 y1: %4',
        U8G2_DRAWRECTANGLE: 'u8g2 draw %1 rectangle x: %2 y: %3 width %4 height %5',
        U8G2_STYLE_NOFILLED: 'no-filled',
        U8G2_STYLE_FILLED: 'filled',
        U8G2_DRAWROUNDRECTANGLE: 'u8g2 draw %1 round rectangle x: %2 y: %3 width %4 height %5 radius %6',
        U8G2_DRAWCIRCLE: 'u8g2 draw %1 circle x: %2 y: %3 radius %4 part %5',
        U8G2_PART_UPPER_RIGHT: 'upper right',
        U8G2_PART_UPPER_LEFT: 'upper left',
        U8G2_PART_LOWER_LEFT: 'lower left',
        U8G2_PART_LOWER_RIGHT: 'lower right',
        U8G2_PART_ALL: 'all',
        U8G2_DRAWELLIPSE: 'u8g2 draw %1 ellipse x: %2 y: %3 width %4 height %5 part %6',
        U8G2_DRAWTRIANGLE: 'u8g2 draw triangle  x0: %1 y0: %2, x1: %3 y1: %4, x2: %5 y2: %6',
        U8G2_SETFONT: 'u8g2 set font %1 direction %2',
        U8G2_SETFONT_TOOLTIP: 'Limited by ROM size, only some Chinese characters are supported. ' +
            'You can try to input them. If not support, they will not be displayed',
        U8G2_FONT_4X6: 'X11 4x6',
        U8G2_FONT_5X7: 'X11 5x7',
        U8G2_FONT_5X8: 'X11 5x8',
        U8G2_FONT_6X10: 'X11 3x10',
        U8G2_FONT_6X12: 'X11 6x12',
        U8G2_FONT_6X13: 'X11 6x13',
        U8G2_FONT_7X13: 'X11 7x13',
        U8G2_FONT_7X14: 'X11 7x14',
        U8G2_FONT_8X13: 'X11 8x13',
        U8G2_FONT_9X15: 'X11 9x15',
        U8G2_FONT_9X18: 'X11 9x18',
        U8G2_FONT_10X20: 'X11 10x20',
        U8G2_FONT_11x11C: 'WQY 11x11 (support chinese)',
        U8G2_FONT_13x13C: 'WQY 13x13 (support chinese)',
        U8G2_FONT_14x14C: 'WQY 14x14 (support chinese)',
        U8G2_FONT_15X15C: 'WQY 15x15 (support chinese)',
        U8G2_FONT_16X16C: 'WQY 16x16 (support chinese)',
        U8G2_DRAWSTRING: 'u8g2 draw string %1 x: %2 y: %3',
        U8G2_SETCURSOR: 'u8g2 set cursor position x: %1 y: %2',
        U8G2_PRINT: 'u8g2 print %1',
        U8G2_CLEAR: 'u8g2 clear display',
        U8G2_REFRESH: 'u8g2 refresh display',
        U8G2_SETDISPLAYROTATION: 'u8g2 set display rotation %1',
        U8G2_DISPLAYROTATION_MIRROR: 'mirror'
    });
    Object.assign(Blockly.ScratchMsgs.locales['zh-cn'], {
        U8G2_CATEGORY: 'U8G2',
        U8G2_12864LCD_INIT: '初始化 u8g2 128x64 lcd 引脚 RS (CS) %1 R/W (DATA) %2 E (CLK) %3',
        U8G2_12864LCD_INIT_TOOLTIP: '仅支持 ST7920 lcd 控制器',
        U8G2_12864OLED_INIT: '初始化 u8g2 128x64 oled 引脚 SCL %1 SDA %2',
        U8G2_OLED_INIT_TOOLTIP: '仅支持 SSD1306 oled 控制器',
        U8G2_12832OLED_INIT: '初始化 u8g2 128x32 oled 引脚 SCL %1 SDA %2',
        U8G2_SETDRAWCOLOR: 'u8g2 设置绘制颜色 %1',
        U8G2_COLOR_COLORED: '有色',
        U8G2_COLOR_NOCOLORED: '无色',
        U8G2_DRAWPIXEL: 'u8g2 绘制像素 x: %1 y: %2',
        U8G2_DRAWVHLINE: 'u8g2 绘制 %1 直线 x: %2 y: %3 长度 %4',
        U8G2_STYLE_VERTICAL: '垂直',
        U8G2_STYLE_HORIZONTAL: '水平',
        U8G2_DRAWLINE: 'u8g2 绘制直线 x0: %1 y0: %2, x1: %3 y1: %4',
        U8G2_DRAWRECTANGLE: 'u8g2 绘制 %1 矩形 x: %2 y: %3 宽度 %4 高度 %5',
        U8G2_STYLE_NOFILLED: '空',
        U8G2_STYLE_FILLED: '实心',
        U8G2_DRAWROUNDRECTANGLE: 'u8g2 绘制 %1 圆角矩形 x: %2 y: %3 宽度 %4 高度 %5 半径 %6',
        U8G2_DRAWCIRCLE: 'u8g2 绘制 %1 圆形 x: %2 y: %3 半径 %4 部位 %5',
        U8G2_PART_UPPER_RIGHT: '右上',
        U8G2_PART_UPPER_LEFT: '左上',
        U8G2_PART_LOWER_LEFT: '左下',
        U8G2_PART_LOWER_RIGHT: '右下',
        U8G2_PART_ALL: '全部',
        U8G2_DRAWELLIPSE: 'u8g2 绘制 %1 椭圆 x: %2 y: %3 宽度 %4 高度 %5 部位 %6',
        U8G2_DRAWTRIANGLE: 'u8g2 绘制实心三角形  x0: %1 y0: %2, x1: %3 y1: %4, x2: %5 y2: %6',
        U8G2_SETFONT: 'u8g2 设置字体 %1 方向 %2',
        U8G2_SETFONT_TOOLTIP: '受限于 ROM 大小仅支持部分汉字, 具体可以尝试输入，如果不支持则不会显示。',
        U8G2_FONT_4X6: 'X11 4x6',
        U8G2_FONT_5X7: 'X11 5x7',
        U8G2_FONT_5X8: 'X11 5x8',
        U8G2_FONT_6X10: 'X11 3x10',
        U8G2_FONT_6X12: 'X11 6x12',
        U8G2_FONT_6X13: 'X11 6x13',
        U8G2_FONT_7X13: 'X11 7x13',
        U8G2_FONT_7X14: 'X11 7x14',
        U8G2_FONT_8X13: 'X11 8x13',
        U8G2_FONT_9X15: 'X11 9x15',
        U8G2_FONT_9X18: 'X11 9x18',
        U8G2_FONT_10X20: 'X11 10x20',
        U8G2_FONT_11x11C: 'WQY 11x11 (支持中文)',
        U8G2_FONT_13x13C: 'WQY 13x13 (支持中文)',
        U8G2_FONT_14x14C: 'WQY 14x14 (支持中文)',
        U8G2_FONT_15X15C: 'WQY 15x15 (支持中文)',
        U8G2_FONT_16X16C: 'WQY 16x16 (支持中文)',
        U8G2_DRAWSTRING: 'u8g2 绘制字符串 %1 x: %2 y: %3',
        U8G2_SETCURSOR: 'u8g2 设置光标位置 x: %1 y: %2',
        U8G2_PRINT: 'u8g2 打印 %1',
        U8G2_CLEAR: 'u8g2 清空屏幕',
        U8G2_REFRESH: 'u8g2 刷新屏幕',
        U8G2_SETDISPLAYROTATION: 'u8g2 设置屏幕旋转 %1',
        U8G2_DISPLAYROTATION_MIRROR: '镜像'
    });
    return Blockly;
}

exports = addMsg;
